1. Field of the Invention
The present invention relates to an image processing apparatus and method, more particularly to an image processing apparatus and method for determining a blending value by estimating a motion level of an image.
2. Description of the Related Art
Video content typically includes a plurality of frames or fields, and the frames for fields) are transmitted as a consecutive sequence. During transmission, if there is a moving object in the video content, pixel differences are present between current and previous frames, that is, differences between pixel values of pixels of the same location occur with respect to present and previous frames. This is because a pixel may be part of an object in the previous frame, and the same pixel may change to be part of the background in the present frame. Therefore, the error is the pixel difference between the object and the background.
Since dynamic images and static images are processed differently during image processing, in order to enhance image processing quality, it is must first be determined which of the pixels in an image are dynamic pixels and which are static pixels, such that subsequent processing may be performed depending on such a pixel classification.
At present, mean absolute difference (MAD) is the most widely used technique for determining whether video content exhibits moving object characteristics. This is accomplished by comparing a MAD value with a predetermined threshold value. The larger the MAD value, the greater the number of pixel differences caused by object movement, and the smaller the MAD value, the smaller the number of pixel differences caused by object movement. Therefore, conventional approaches use the size of the numerical value of MAD to determine whether there is object movement.
The formula for calculating MAD is shown in the following Formula (F1):
                              MAD          ⁡                      (                                          ⅆ                x                            ,                              ⅆ                y                                      )                          =                              1                          m              ·              n                                ⁢                                    ∑                              i                =                0                            n                        ⁢                                          ∑                                  j                  =                  0                                m                            ⁢                                                                                                          P                      k                                        ⁡                                          (                                              i                        ,                        j                                            )                                                        -                                                            P                                              k                        -                        1                                                              ⁡                                          (                                              i                        ,                        j                                            )                                                                                                                                              (                  F          ⁢          .1                )            
where m and n are resolution dimensions of video content, Pk(i,j) is a pixel value of a pixel at position (i,j) of a kth frame, and Pk−1(i,j) is a pixel value of a pixel at position (i,j) of a (k−1)th frame. “Pixel value” refers to the luminance value (luma) or the chromatic value (chrome) of a pixel.
An example is provided with reference to FIG. 1 which shows a consecutive frame sequence (S) including frames S1, S2 . . . Sk−1, Sk, Sk+1, etc. Referring additionally to FIG. 2, if it is assumed that an object Ok in the frame Sk is moved relative to an object Ok−1 in the frame Sk−1, then MADmotion is calculated as follows:
      MAD    noise    =                    1                  5          ·          5                    ⁡              [                                                        45              -              40                                            +                                                35              -              35                                            +                                                32              -              32                                            +                                                41              -              41                                            +                                                40              -              40                                            +                                                47              -              20                                            +                                                30              -              26                                            +                                                20              -              25                                            +                                                36              -              30                                            +                                                35              -              35                                            +                                                40              -              20                                            +                                                20              -              20                                            +                                                18              -              20                                            +                                                24              -              24                                            +                                                11              -              27                                            +                                                20              -              20                                            +                                                18              -              20                                            +                                                20              -              20                                            +                                                10              -              18                                            +                                                                                      26                  -                  26                                                            ++                        ⁢                                                        20                -                20                                                            +                                                29              -              20                                            +                                                20              -              20                                            +                                                10              -              20                                            +                                                36              -              25                                                  ]              =    5  
MADmotion is compared with a threshold value to determine if there is a moving object in the frame.
However, during processing or transmission of video signals, some of the frames or fields may be affected by noise to thereby undergo change (e.g., some of the pixel values change). For instance, referring to FIGS. 3 and 4, if it is assumed that there is noise in the frame Sk, this may cause at least one pixel value in the frame Sk to change. If it is further assumed that there is no moving object and a pixel in the frame Sk undergoes change due to noise, then MADnoise may be calculated as follows using Formula (F1):
      MAD    noise    =                    1                  5          ·          5                    ⁡              [                                                        45              -              40                                            +                                                35              -              35                                            +                                                32              -              32                                            +                                                41              -              41                                            +                                                40              -              40                                            +                                                47              -              20                                            +                                                30              -              26                                            +                                                20              -              25                                            +                                                36              -              30                                            +                                                35              -              35                                            +                                                40              -              20                                            +                                                20              -              20                                            +                                                18              -              20                                            +                                                24              -              24                                            +                                                11              -              27                                            +                                                20              -              20                                            +                                                18              -              20                                            +                                                20              -              20                                            +                                                10              -              18                                            +                                                                                      26                  -                  26                                                            ++                        ⁢                                                        20                -                20                                                            +                                                29              -              20                                            +                                                20              -              20                                            +                                                10              -              20                                            +                                                36              -              25                                                  ]              =    5  
From the foregoing, it is evident that with respect to the frame Sk, there is no difference between MADnoise occurring when there is noise and MADmotion occurring when there is object movement in a frame. Hence, using the conventional determination method, it is not possible to determine whether differences in pixel values between a present image and a previous image are due to noise interference or dynamic imaging.
When movement in an image is mistaken for noise interference, loss of image fidelity will occur. Since MAD is the result of object movement during dynamic imaging, each pixel value in the frame Sk is not necessarily related to the previous frame Sk−1. For example, due to object movement, pixel (i,j) may be part of an object in the frame Sk−1, while the same pixel (i,j) may be part of the background in the frame Sk. If this is mistaken for noise interference, and mean processing is performed for the pixel values of the previous and subsequent images in order to cancel the noise, the end result may be image streaking. Such mistaking movement in an image for noise interference is highly possible using conventional approaches.